package com.snl.micro.blog.article.client;

import com.snl.micro.blog.common.protocol.ResponseResult;
import com.snl.micro.blog.common.query.CommentQuery;
import com.snl.micro.blog.common.query.UserQuery;
import com.snl.micro.blog.common.vo.CommentVo;
import com.snl.micro.blog.common.vo.UserVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.List;

@FeignClient(name = "device",url = "http://localhost:10000")
public interface UserClient {

//    注册服务发现
    @GetMapping("/v1/user/query")
    ResponseResult<List<UserVo>> query(@SpringQueryMap UserQuery query);

    @GetMapping("/v1/comment/query")
    ResponseResult<List<CommentVo>> query(@SpringQueryMap CommentQuery query);
}
